<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<c:forEach items="${orders}" var="order">
	<div class="weui_cells_title" style="background: #efefef; color: #000; font-size: 16px; margin-top: 5px;">
		<fmt:formatDate value="${ order.createdAt }" type="both" />
	</div>
	<c:set var="sum" value="0"></c:set>
	<c:forEach items="${order.storageOrder}" var="storageOrder">
		<div class="weui_cells_title">
			<span>${storageOrder.storage.name}</span>
			<p style="float: right; color: #568aed;">${orderState[storageOrder.state]}</p>
		</div>
		<c:forEach items="${storageOrder.goodsOrder}" var="goodsOrder">
			<c:set var="sum" value="${sum+goodsOrder.num}"></c:set>
			<div class="weui_cells weui_cells_access">
				<a class="weui_cell" href="javascript:;" style="border-bottom: #ddd 1px dashed; padding: 5px;">
					<div class="weui_cell_hd">
						<!-- <img src="${goodsOrder.image }" alt=""
							style="width: 60px; height: 60px; margin-right: 5px; display: block;"> -->
						<img src="${staticPath}/images/secret.png" alt="" style="width: 60px; height: 60px; margin-right: 5px; display: block;">
					</div>
					<div class="weui_cell_bd weui_cell_primary">
						<!-- <p>${goodsOrder.name}</p> -->
						<p>******</p>
						<h4>
							<c:if test="${goodsOrder.points>=0}">
										￥
										<fmt:formatNumber value="${goodsOrder.price/100}" pattern="#,###.##" />
							</c:if>
							<c:if test="${goodsOrder.points<0}">
										积分${-goodsOrder.points}
										</c:if>
						</h4>
						<p>X${goodsOrder.num}</p>

					</div>
				</a>
			</div>
		</c:forEach>

	</c:forEach>
	<div style="height: 110px;">
		<div class="tjleft">
			<p>共${sum}件</p>
		</div>
		<div class="tjmid">
			<p>商品金额：</p>
			<p>优惠金额：</p>
			<p>运费：</p>
			<p>总计 ：</p>
		</div>
		<div class="tjright">
			<p>
				￥
				<fmt:formatNumber value="${order.goodsAmount/100}" pattern="#,###.##" />
			</p>
			<p>
				-￥
				<fmt:formatNumber value="${order.discountAmount/100}" pattern="#,###.##" />
			</p>
			<p>
				￥
				<fmt:formatNumber value="${order.freightAmount/100}" pattern="#,###.##" />
			</p>
			<p>
				￥
				<fmt:formatNumber value="${order.resultAmount/100}" pattern="#,###.##" />
			</p>
		</div>
	</div>
	<div class="button_sp_area" style="border-top: 1px dashed #ddd; text-align: right; padding-right: 5px;"></div>
</c:forEach>



<c:if test="${over==true}">
	<input id="over" value="true" type="hidden" />
</c:if>
